<!-- Main content -->
<div class="content-body py-3 pe-3">
    <!-- Main content -->
    <section class="" ng-init="getSingle()">
        <h3>Grant permission</h3>
        <p class="text-subtitle text-muted">
            Select access permissions to assign for this role.
        </p>

        <div class="row mb-3">
            <div class="col-8"></div>
            <actions class="col-4" preview-url="viewmodel.fullPath" back-url="'/portal/role/list'"></actions>
        </div>
        <div class="row">
            <div class="col-md-12 mb-3">
                <a href="{{createUrl}}" class="btn btn-sm btn-primary float-end px-4 me-2 text-white">
                    <i class="fas fa-plus"></i> Create data
                </a>
            </div>
        </div>
        <div class="col-md-12">
            <tabs-v class="mb-3">
                <pane-v icon="fas fa-pen" header="Permission Navigations">
                    <form ng-if="viewmodel" ng-class="{'submitted': submitted}" ng-submit="save()">
                        <h6 class="card-header">
                            Select roles
                            <span class="text-muted" ng-if="!viewmodel.permissions || !viewmodel.permissions.length">
                                No Permission Found!
                            </span>
                        </h6>
                        <div class="card-body">
                            <div class="" ng-repeat="page in viewmodel.permissions">
                                <role-page-nav page="page" class=""></role-page-nav>
                            </div>
                        </div>
                    </form>
                </pane-v>
                <pane-v icon="fas fa-pen" header="Endpoints">
                    <mix-database-nav-values ng-if="viewmodel" ng-init="initPermissions()"
                        mix-database-name="'sys_permission'" parent-id="viewmodel.id" parent-type="'Role'"
                        create-url="createUrl" update-url="updateUrl" on-update="" on-delete="">
                    </mix-database-nav-values>
                </pane-v>
            </tabs-v>


        </div>
    </section>
    <!-- /.content -->
</div>